import React from "react";
import "./style.scss";

function AnalysisCard(props) {
    return (
        <div className="PAnalysisCard">
            <div className="PAnalysisCard-inner">
                <header className="PAnalysisCard-header">
                    {props.header ? (
                        props.header
                    ) : (
                        <div className="PAnalysisCard-header-with-suffix">
                            <div className="PAnalysisCard-title">{props.title}</div>
                            <div className="PAnalysisCard-suffix">{props.suffix}</div>
                        </div>
                    )}
                </header>
                <main className="PAnalysisCard-content">{props.children}</main>
            </div>
        </div>
    );
}

export default AnalysisCard;
